//1.引入系统http模块
let http=require('http')
//2.创建服务器，request请求消息，response响应消息
let server=http.createServer(function(require,response){
    //编写头信息 编码格式
    response.writeHead(200,{
        "Content-Type": "text/html; charset=UTF-8",
        //"Content-Type": "application/json; charset=UTF-8",
        "kk":"2222"
    })

let str=
`
<h1>你好世界</h1>
hello
`
// str=
// {
//    "name" :"张三",
// }

    //response.write(JSON.stringify(str))
    response.write(str)
    response.end();
})
server.listen(9090,function(){
    console.log("服务器启动成功，监听端口号8080")
})